﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Solution.Business.Entities;

namespace Solution.Data
{
    public class AdvertiseDAC
    {
        SolutionEntities context = SolutionEntities.Context;
        public List<Advertise> Advertise_GetByTop(string Top, string Where, string Ord)
        {
            var list = context.Advertise_GetByTop(Top, Where, Ord);
            return list.ToList();
        }

        public void Advertise_Insert(Advertise advertise)
        {
            context.Advertise_Insert(advertise.Name,advertise.Image,advertise.Width,advertise.Height,advertise.Link,advertise.Position,advertise.Ord,advertise.Active);
        }

        public void Advertise_Update(Advertise advertise)
        {
            context.Advertise_Update(advertise.AId, advertise.Name, advertise.Image, advertise.Width, advertise.Height, advertise.Link, advertise.Position, advertise.Ord, advertise.Active);
        }
    }
}
